Optimal. Leaf size=213 \[ -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}-\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {a F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{f \sqrt {a+b \sin (e+f x)}}+\frac {b \Pi \left (2;\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{f \sqrt {a+b \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 213, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {2875, 3139,
2734, 2732, 3081, 2742, 2740, 2886, 2884} \begin {gather*} -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}+\frac {a \sqrt {\frac {a+b \sin (e+f x)}{a+b}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{f \sqrt {a+b \sin (e+f x)}}-\frac {\sqrt {a+b \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {b \sqrt {\frac {a+b \sin (e+f x)}{a+b}} \Pi \left (2;\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{f \sqrt {a+b \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2875
Rule 2884
Rule 2886
Rule 3081
Rule 3139
Rubi steps
\begin {align*} \int \csc ^2(e+f x) \sqrt {a+b \sin (e+f x)} \, dx &=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}+\int \frac {\csc (e+f x) \left (\frac {b}{2}-\frac {1}{2} b \sin ^2(e+f x)\right )}{\sqrt {a+b \sin (e+f x)}} \, dx\\ &=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}-\frac {1}{2} \int \sqrt {a+b \sin (e+f x)} \, dx-\frac {\int \frac {\csc (e+f x) \left (-\frac {b^2}{2}-\frac {1}{2} a b \sin (e+f x)\right )}{\sqrt {a+b \sin (e+f x)}} \, dx}{b}\\ &=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}+\frac {1}{2} a \int \frac {1}{\sqrt {a+b \sin (e+f x)}} \, dx+\frac {1}{2} b \int \frac {\csc (e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx-\frac {\sqrt {a+b \sin (e+f x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}} \, dx}{2 \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}\\ &=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}-\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {\left (a \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{2 \sqrt {a+b \sin (e+f x)}}+\frac {\left (b \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right ) \int \frac {\csc (e+f x)}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{2 \sqrt {a+b \sin (e+f x)}}\\ &=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{f}-\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {a F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{f \sqrt {a+b \sin (e+f x)}}+\frac {b \Pi \left (2;\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{f \sqrt {a+b \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 16.07, size = 312, normalized size = 1.46 \begin {gather*} \frac {\frac {2 i \left (-2 a (a-b) E\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )+b \left (-2 a F\left (i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )+b \Pi \left (\frac {a+b}{a};i \sinh ^{-1}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )\right )\right ) \sec (e+f x) \sqrt {-\frac {b (-1+\sin (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sin (e+f x))}{a-b}}}{a b \sqrt {-\frac {1}{a+b}}}-4 \cot (e+f x) \sqrt {a+b \sin (e+f x)}-\frac {2 b \Pi \left (2;\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{\sqrt {a+b \sin (e+f x)}}}{4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.12, size = 456, normalized size = 2.14
method | result | size |
default | \(-\frac {a \,b^{2} \sin \left (f x +e \right ) \left (\cos ^{2}\left (f x +e \right )\right )+\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {b \sin \left (f x +e \right )}{a -b}-\frac {b}{a -b}}\, \sqrt {-\frac {b \sin \left (f x +e \right )}{a +b}+\frac {b}{a +b}}\, \left (\EllipticF \left (\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{2} b -\EllipticF \left (\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{2}+\EllipticPi \left (\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}, \frac {a -b}{a}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{2}-\EllipticPi \left (\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}, \frac {a -b}{a}, \sqrt {\frac {a -b}{a +b}}\right ) b^{3}-\EllipticE \left (\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{3}+\EllipticE \left (\sqrt {\frac {b \sin \left (f x +e \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{2}\right ) \sin \left (f x +e \right )+a^{2} b \left (\cos ^{2}\left (f x +e \right )\right )}{a b \sin \left (f x +e \right ) \cos \left (f x +e \right ) \sqrt {a +b \sin \left (f x +e \right )}\, f}\) | \(456\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sin {\left (e + f x \right )}} \csc ^{2}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {a+b\,\sin \left (e+f\,x\right )}}{{\sin \left (e+f\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________